<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    /*   
                                       共6行
                               i       千       锋
       千千千千千锋             1       5        1                   
       千千千千锋锋锋           2       4        3
       千千千锋锋锋锋锋         3       3        5
       千千锋锋锋锋锋锋锋       4       2        7
       千锋锋锋锋锋锋锋锋锋     5       1        9
       锋锋锋锋锋锋锋锋锋锋锋   6       0        11
                              i      6-i       2*i-1
    */

    // var n = 6;
    // for(var i = 1;i <= n; i++){
    //     // 千
    //     for(var j = 1;j <= n - i; j++){
    //         document.write("千");
    //     }

    //     for(var k = 1; k <= 2 * i -1; k++){
    //         document.write("锋");
    //     }

    //     document.write("<br>");
    // }




    /*  var n = 6;
     for(var i = 1;i <= n; i++){
         // 千
         for(var j = 1;j <= n - i; j++){
             document.write("千");
         }
 
         for(var k = 1; k <= 2 * i -1; k++){
             document.write("锋");
         }
 
         document.write("<br>");
     }
 
     for(var i = n - 1;i >= 1; i--){
         // 千
         for(var j = 1;j <= n - i; j++){
             document.write("千");
         }
 
         for(var k = 1; k <= 2 * i -1; k++){
             document.write("锋");
         }
 
         document.write("<br>");
     } */


    /* 
                             n =    11 => 11 / 2 => 5 
                                 i        千      锋 
    千千千千千锋                 -5        5      11-(5*2)
    千千千千锋锋锋               -4        4      11-(4*2)
    千千千锋锋锋锋锋             -3        3      11-(3*2)    
    千千锋锋锋锋锋锋锋            -2       2      11-(2*2)
    千锋锋锋锋锋锋锋锋锋          -1       1       11-(1*2)
    锋锋锋锋锋锋锋锋锋锋锋         0        0
    千锋锋锋锋锋锋锋锋锋           1        1
    千千锋锋锋锋锋锋锋            2        2 
    千千千锋锋锋锋锋              3       3
    千千千千锋锋锋                4       4
    千千千千千锋                  5       5
                                 i       i

    
     */

    var n = 11;
    var mid = Math.floor(n / 2);
    for (var i = -mid; i <= mid; i++) {
        for(var j = 1; j<= Math.abs(i);j++){
            document.write("千");
        }
        for(var k = 1; k<= n - 2 * Math.abs(i);k++){
            document.write("锋");
        }
        for(var j = 1; j<= Math.abs(i);j++){
            document.write("千");
        }
        document.write("<br>");
    }
</script>

</html>